#pragma once

#include "Control_Text.h"

#include <functional>

namespace gui
{
	class Control_Value : public Control_Text
	{
	public:
		typedef std::function< float() > CallbackGetFloatValue;

		Control_Value(CallbackGetFloatValue NewCallbackGetValue, std::string NewFormat, std::string NewCaption, Vec<2, float> NewFontSize, ColorRGBA<unsigned char> NewForeColor, ColorRGBA<unsigned char> NewBackColor, Vec<2, float> NewPos, Vec<2, float> NewSize, Control_Menu* NewParentMenu, Host& NewParentHost);
		virtual ~Control_Value(void);

	protected:
		virtual void Refresh();

		virtual void UpdateVerticesFix(RendererComponent& Renderer);
		virtual void UpdateVerticesSlow(RendererComponent& Renderer);

		//float *Value;//zu int value machen
		std::string Format;

		CallbackGetFloatValue CallbackGetValue;
		std::string RawCaption;
		float Value;
		void RefreshCaption();
	};
}
